﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace KProject
{
    public partial class FormEditar : Form
    {
        public FormEditar()
        {
            InitializeComponent();
        }

        private void bCancelarNovo_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void bOkNovo_Click(object sender, EventArgs e)
        {
            if (tbNomeConcurso.Text == null || tbNomeConcurso.Text.Trim().Length < 1)
                MessageBox.Show("Insira o nome do concurso", "Aviso", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            else if (dpDataConcurso.Value == null)
                MessageBox.Show("Insira a data do concurso", "Aviso", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            else
                this.Close();
        }

        public string GetNomeConcurso()
        {
            return tbNomeConcurso.Text;
        }

        public DateTime GetDataConcurso()
        {
            return dpDataConcurso.Value;
        }

        public string GetCidadeConcurso()
        {
            return tbCidadeConcurso.Text;
        }
    }
}
